package me.luger.core.commom.util;

import org.springframework.core.LocalVariableTableParameterNameDiscoverer;

import java.lang.reflect.Method;

/**
 * Created by Administrator on 2017/6/23 0023.
 */
public class ReflectUtil {

    /**
     * 通过方法获得方法的所有参数
     * @param method
     * @return
     */
    public static String[] getMethodParameterNames(Method method){
        LocalVariableTableParameterNameDiscoverer u = new LocalVariableTableParameterNameDiscoverer();
        String[] paraNameArr = u.getParameterNames(method);
        return paraNameArr;
    }
}
